<!DOCTYPE html>



  


<html class="theme-next pisces use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.3" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/favicon.ico?v=5.1.3">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon.ico?v=5.1.3">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon.ico?v=5.1.3">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.3" color="#222">





  <meta name="keywords" content="hexo,环境," />










<meta name="description" content="工具 / 原料 Windows（Mac 也是差不多，可参照）   Git   Node.js  Git安装下载并安装Git，度娘备份，msysgit 是 Windows 版的 Git，按照默认安装。 安装完成后，在开始菜单里找到 “Git”-&amp;gt;“Git Bash”，如图表示安装成功 Node.js安装下载并安装Node.js,安装完成后在CMD输入  node -v显示版本表示安装node.">
<meta name="keywords" content="hexo,环境">
<meta property="og:type" content="article">
<meta property="og:title" content="hexo及其环境的搭建及进阶(Windows+HTTP版)">
<meta property="og:url" content="http://hexo.mantoujun.top/2017/04/20/hexo及其环境的搭建及进阶(Windows+HTTP版)/index.html">
<meta property="og:site_name" content="未知领域">
<meta property="og:description" content="工具 / 原料 Windows（Mac 也是差不多，可参照）   Git   Node.js  Git安装下载并安装Git，度娘备份，msysgit 是 Windows 版的 Git，按照默认安装。 安装完成后，在开始菜单里找到 “Git”-&amp;gt;“Git Bash”，如图表示安装成功 Node.js安装下载并安装Node.js,安装完成后在CMD输入  node -v显示版本表示安装node.">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="http://hexo.mantoujun.top/2017/04/20/hexo及其环境的搭建及进阶(Windows+HTTP版)/Git安装.jpg">
<meta property="og:image" content="http://hexo.mantoujun.top/2017/04/20/hexo及其环境的搭建及进阶(Windows+HTTP版)/Hexo初始.jpg">
<meta property="og:updated_time" content="2017-04-27T19:28:24.206Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="hexo及其环境的搭建及进阶(Windows+HTTP版)">
<meta name="twitter:description" content="工具 / 原料 Windows（Mac 也是差不多，可参照）   Git   Node.js  Git安装下载并安装Git，度娘备份，msysgit 是 Windows 版的 Git，按照默认安装。 安装完成后，在开始菜单里找到 “Git”-&amp;gt;“Git Bash”，如图表示安装成功 Node.js安装下载并安装Node.js,安装完成后在CMD输入  node -v显示版本表示安装node.">
<meta name="twitter:image" content="http://hexo.mantoujun.top/2017/04/20/hexo及其环境的搭建及进阶(Windows+HTTP版)/Git安装.jpg">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Pisces',
    version: '5.1.3',
    sidebar: {"position":"left","display":"always","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://hexo.mantoujun.top/2017/04/20/hexo及其环境的搭建及进阶(Windows+HTTP版)/"/>





  <title>hexo及其环境的搭建及进阶(Windows+HTTP版) | 未知领域</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">未知领域</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">女装是最吼的</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://hexo.mantoujun.top/2017/04/20/hexo及其环境的搭建及进阶(Windows+HTTP版)/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="pancc">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/uploads/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="未知领域">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">hexo及其环境的搭建及进阶(Windows+HTTP版)</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-04-20T21:59:07+08:00">
                2017-04-20
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/hexo/" itemprop="url" rel="index">
                    <span itemprop="name">hexo</span>
                  </a>
                </span>

                
                
                  ， 
                
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/hexo/开发/" itemprop="url" rel="index">
                    <span itemprop="name">开发</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="工具-原料"><a href="#工具-原料" class="headerlink" title="工具 / 原料"></a>工具 / 原料</h1><ul>
<li>Windows（Mac 也是差不多，可参照）  </li>
<li>Git  </li>
<li>Node.js</li>
</ul>
<h2 id="Git安装"><a href="#Git安装" class="headerlink" title="Git安装"></a>Git安装</h2><p>下载并安装<a href="https://git-for-windows.github.io/" target="_blank" rel="noopener">Git</a>，<a href="https://pan.baidu.com/s/1kU5OCOB#list/path=/pub/git" target="_blank" rel="noopener">度娘备份</a>，msysgit 是 Windows 版的 Git，按照默认安装。</p>
<p>安装完成后，在开始菜单里找到 “Git”-&gt;“Git Bash”，如图表示安装成功<br><img src="/2017/04/20/hexo及其环境的搭建及进阶(Windows+HTTP版)/Git安装.jpg" alt="Git安装"></p>
<h2 id="Node-js安装"><a href="#Node-js安装" class="headerlink" title="Node.js安装"></a>Node.js安装</h2><p>下载并安装<a href="https://nodejs.org/en/download/" target="_blank" rel="noopener">Node.js</a>,安装完成后在CMD输入  <code>node -v</code>显示版本表示安装node.js成功,输入<code>npm -v</code> 显示版本表示自带的npm环境安装成功</p>
<p>npm 的作用就是对 Node.js 依赖的包进行管理，也可以理解为用来安装 / 卸载 Node.js 需要装的东西</p>
<p>注：当不显示版本时请添加对应的环境变量并重启系统</p>
<h2 id="安装-Hexo"><a href="#安装-Hexo" class="headerlink" title="安装 Hexo"></a>安装 Hexo</h2><ol>
<li>利用 npm 命令即可安装。在任意位置点击鼠标右键，选择 Git Bash。输入命令<code>npm install -g hexo</code>注意：-g是指全局安装hexo。<h1 id="部署hexo"><a href="#部署hexo" class="headerlink" title="部署hexo"></a>部署hexo</h1><h2 id="创建Hexo文件夹"><a href="#创建Hexo文件夹" class="headerlink" title="创建Hexo文件夹"></a>创建Hexo文件夹</h2>1、新建文件夹 Hexo<br>2、</li>
</ol>
<figure class="highlight scilab"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> Hexo</span><br><span class="line">hexo init <span class="comment">//Hexo 即会自动在目标文件夹建立网站所需要的所有文件。</span></span><br><span class="line">npm install <span class="comment">//安装依赖包</span></span><br></pre></td></tr></table></figure>
<h2 id="本地查看"><a href="#本地查看" class="headerlink" title="本地查看"></a>本地查看</h2><p>执行以下命令(在Hexo文件夹下)，然后到浏览器输入localhost:4000看看。</p>
<figure class="highlight vbscript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">hexo generate</span><br><span class="line">hexo <span class="built_in">server</span></span><br></pre></td></tr></table></figure>
<p><img src="/2017/04/20/hexo及其环境的搭建及进阶(Windows+HTTP版)/Hexo初始.jpg" alt="hexo初始"></p>
<h2 id="注册Github账号"><a href="#注册Github账号" class="headerlink" title="注册Github账号"></a>注册Github账号</h2><h2 id="创建Repository仓库"><a href="#创建Repository仓库" class="headerlink" title="创建Repository仓库"></a>创建Repository仓库</h2><p>新建<code>用户名.github.io</code>的仓库</p>
<h2 id="修改配置文件"><a href="#修改配置文件" class="headerlink" title="修改配置文件"></a>修改配置文件</h2><p>1.到刚创建的Repository下，获得SSH地址</p>
<p>2.编辑Hexo根目录下的<code>_config.yml</code></p>
<p>3.修改文件里面的deploy。其中的repository 添加为SSH，如</p>
<figure class="highlight less"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="attribute">deploy</span>:</span><br><span class="line">  <span class="attribute">type</span>: git</span><br><span class="line">  <span class="attribute">repo</span>: <span class="attribute">https</span>:<span class="comment">//github.com/jasmine-na/jasmine-na.github.io.git</span></span><br><span class="line">  <span class="attribute">branch</span>: master</span><br></pre></td></tr></table></figure>
<h2 id="完成部署"><a href="#完成部署" class="headerlink" title="完成部署"></a>完成部署</h2><ol>
<li>下载hexo-deployer-git</li>
</ol>
<figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm <span class="keyword">install</span> hexo-deployer-git –<span class="keyword">save</span></span><br></pre></td></tr></table></figure>
<ol>
<li>最后一步，Git Bash下，依次键入以下指令</li>
</ol>
<figure class="highlight stata"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"> hexo clean <span class="comment">//清除缓存文件 db.json 和已生成的静态文件 public</span></span><br><span class="line"></span><br><span class="line">hexo <span class="keyword">generate</span> <span class="comment">//生成网站静态文件到默认设置的 public 文件夹</span></span><br><span class="line"></span><br><span class="line">hexo deploy <span class="comment">//自动生成网站静态文件，并部署到设定的仓库。</span></span><br></pre></td></tr></table></figure>
<p>hexo deploy过程中会提示输入账号名和密码，Username是Github账号名称，而不是邮箱；Password就是Github的密码<br>访问<code>用户名.github.io</code>进入主页</p>
<h1 id="进阶"><a href="#进阶" class="headerlink" title="进阶"></a>进阶</h1><h2 id="Tips"><a href="#Tips" class="headerlink" title="Tips"></a>Tips</h2><p>hexo现在支持更加简单的命令格式</p>
<figure class="highlight stata"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">hexo <span class="keyword">g</span> == hexo <span class="keyword">generate</span></span><br><span class="line"></span><br><span class="line">hexo <span class="keyword">d</span> == hexo deploy</span><br><span class="line"></span><br><span class="line">hexo s == hexo server</span><br><span class="line"></span><br><span class="line">hexo <span class="keyword">n</span> == hexo new</span><br><span class="line"></span><br><span class="line">hexo <span class="keyword">g</span> -<span class="keyword">d</span> == hexo <span class="keyword">generate</span>&amp;&amp;hexo deploy</span><br><span class="line">hexo <span class="keyword">generate</span> --watch  <span class="comment">//监视文件变动并立即重新生成静态文件</span></span><br></pre></td></tr></table></figure>
<p>更新内容需要执行:</p>
<figure class="highlight stata"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">hexo clean</span><br><span class="line">hexo <span class="keyword">g</span> -<span class="built_in">d</span></span><br></pre></td></tr></table></figure>
<h3 id="如果您想要更改端口，或是在执行时遇到了-EADDRINUSE-错误，可以在执行时使用-p选项指定其他端口，如下："><a href="#如果您想要更改端口，或是在执行时遇到了-EADDRINUSE-错误，可以在执行时使用-p选项指定其他端口，如下：" class="headerlink" title="如果您想要更改端口，或是在执行时遇到了 EADDRINUSE 错误，可以在执行时使用 -p选项指定其他端口，如下："></a>如果您想要更改端口，或是在执行时遇到了 <code>EADDRINUSE</code> 错误，可以在执行时使用 <code>-p</code>选项指定其他端口，如下：</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo server -p 5000</span><br></pre></td></tr></table></figure>
<h3 id="静态模式"><a href="#静态模式" class="headerlink" title="静态模式"></a>静态模式</h3><p>在静态模式下，服务器只处理 <code>public</code> 文件夹内的文件，而不会处理文件变动，在执行时，您应该先自行执行 <code>hexo generate</code>，此模式通常用于生产环境（production mode）下。<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo server -s</span><br></pre></td></tr></table></figure></p>
<h3 id="自定义-IP"><a href="#自定义-IP" class="headerlink" title="自定义 IP"></a>自定义 IP</h3><p>服务器默认运行在 0.0.0.0，您可以覆盖默认的 IP 设置，如下：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo server -i 192.168.1.1</span><br></pre></td></tr></table></figure></p>
<p>定这个参数后，您就只能通过该 IP 才能访问站点。例如，对于一台使用无线网络的笔记本电脑，除了指向本机的<code>127.0.0.1</code>外，通常还有一个<code>192.168.*.*</code>的局域网 IP，如果像上面那样使用<code>-i</code>参数，就不能用<code>127.0.0.1</code>来访问站点了。对于有公网 IP 的主机，如果您指定一个局域网 IP 作为<code>-i</code>参数的值，那么就无法通过公网来访问站点。</p>
<h3 id="相对路径引用的标签插件"><a href="#相对路径引用的标签插件" class="headerlink" title="相对路径引用的标签插件"></a>相对路径引用的标签插件</h3><p>通过常规的 markdown 语法和相对路径来引用图片和其它资源可能会导致它们在存档页或者主页上显示不正确。在 Hexo 2 时代，社区创建了很多插件来解决这个问题。但是，随着 Hexo 3 的发布，许多新的标签插件被加入到了核心代码中。这使得你可以更简单地在文章中引用你的资源。<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">&#123;% asset_path slug %&#125;</span><br><span class="line">&#123;% asset_img slug [title] %&#125;</span><br><span class="line">&#123;% asset_link slug [title] %&#125;</span><br></pre></td></tr></table></figure></p>
<p>比如说：当你打开文章资源文件夹功能后，你把一个 <code>example.jpg</code> 图片放在了你的资源文件夹中，如果通过使用相对路径的常规 markdown 语法<code>![](/example.jpg)</code>，它将 不会 出现在首页上。（但是它会在文章中按你期待的方式工作）<br>正确的引用图片方式是使用下列的标签插件而不是 markdown ：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">&#123;% asset_img example.jpg This is an example image %&#125;</span><br></pre></td></tr></table></figure></p>
<p>通过这种方式，图片将会同时出现在文章和主页以及归档页中。</p>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/hexo/" rel="tag"># hexo</a>
          
            <a href="/tags/环境/" rel="tag"># 环境</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/04/21/利用 hexo-asset-image 插件为hexo博文插入图片/" rel="prev" title="利用 hexo-asset-image 插件为hexo博文插入图片">
                利用 hexo-asset-image 插件为hexo博文插入图片 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="/uploads/avatar.jpg"
                alt="pancc" />
            
              <p class="site-author-name" itemprop="name">pancc</p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">28</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">28</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">26</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          

          <div class="links-of-author motion-element">
            
          </div>

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#工具-原料"><span class="nav-number">1.</span> <span class="nav-text">工具 / 原料</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#Git安装"><span class="nav-number">1.1.</span> <span class="nav-text">Git安装</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Node-js安装"><span class="nav-number">1.2.</span> <span class="nav-text">Node.js安装</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#安装-Hexo"><span class="nav-number">1.3.</span> <span class="nav-text">安装 Hexo</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#部署hexo"><span class="nav-number">2.</span> <span class="nav-text">部署hexo</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#创建Hexo文件夹"><span class="nav-number">2.1.</span> <span class="nav-text">创建Hexo文件夹</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#本地查看"><span class="nav-number">2.2.</span> <span class="nav-text">本地查看</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#注册Github账号"><span class="nav-number">2.3.</span> <span class="nav-text">注册Github账号</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#创建Repository仓库"><span class="nav-number">2.4.</span> <span class="nav-text">创建Repository仓库</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#修改配置文件"><span class="nav-number">2.5.</span> <span class="nav-text">修改配置文件</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#完成部署"><span class="nav-number">2.6.</span> <span class="nav-text">完成部署</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#进阶"><span class="nav-number">3.</span> <span class="nav-text">进阶</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#Tips"><span class="nav-number">3.1.</span> <span class="nav-text">Tips</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#如果您想要更改端口，或是在执行时遇到了-EADDRINUSE-错误，可以在执行时使用-p选项指定其他端口，如下："><span class="nav-number">3.1.1.</span> <span class="nav-text">如果您想要更改端口，或是在执行时遇到了 EADDRINUSE 错误，可以在执行时使用 -p选项指定其他端口，如下：</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#静态模式"><span class="nav-number">3.1.2.</span> <span class="nav-text">静态模式</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#自定义-IP"><span class="nav-number">3.1.3.</span> <span class="nav-text">自定义 IP</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#相对路径引用的标签插件"><span class="nav-number">3.1.4.</span> <span class="nav-text">相对路径引用的标签插件</span></a></li></ol></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; 2015 &mdash; <span itemprop="copyrightYear">2018</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">pancc</span>

  
</div>









        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  




  
  









  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  

  
  
    <script type="text/javascript" src="/lib/three/three.min.js"></script>
  

  
  
    <script type="text/javascript" src="/lib/three/three-waves.min.js"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.3"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.3"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.3"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.3"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.3"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.3"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.3"></script>



  


  




	





  





  









<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src="//unpkg.com/valine/dist/Valine.min.js"></script>



  





  

  

  

  
  

  

  

  

</body>
</html>
